The General Social Survey is not a panel survey. However, it is both a very long-running with a large and diverse set of participants, and while the survey contains nearly no personally identifying information some basic demographic information is included in the data. Because both “age of respondent” and “year of survey” are provided, some basic manipulation of the data gets it to a place where we can use birth year as a unit of analysis.
For the sake of sample size,
A screenshot of an excel sheet of sample sizes.
import pandas as pd
gss_frame_1 = pd.read_csv('fp_gss_1.csv')
gss_frame_1['year_of_birth'] = gss_frame_1.year - gss_frame_1.age
gss_frame_1['yearborn_binned5'] = (gss_frame_1.year_of_birth // 5) * 5 #rounds year born to nearest 5-year interval
print(pd.crosstab(gss_frame_1.yearborn_binned5, gss_frame_1.year))
## year 1972 1973 1974 1975 1976 ... 2010 2012 2014 2016 2018
## yearborn_binned5 ...
## 1880.0 4 1 0 0 0 ... 0 0 0 0 0
## 1885.0 12 3 12 8 13 ... 0 0 0 0 0
## 1890.0 33 15 23 24 25 ... 0 0 0 0 0
## 1895.0 64 55 38 45 47 ... 0 0 0 0 0
## 1900.0 81 69 73 44 68 ... 0 0 0 0 0
## 1905.0 98 98 106 111 81 ... 0 0 0 0 0
## 1910.0 119 108 83 94 102 ... 0 0 0 0 0
## 1915.0 136 129 113 100 115 ... 0 0 0 0 0
## 1920.0 160 127 129 111 122 ... 40 22 0 0 0
## 1925.0 157 122 110 120 93 ... 53 44 53 34 29
## 1930.0 111 122 125 126 95 ... 67 58 62 67 49
## 1935.0 133 167 137 126 124 ... 71 85 116 116 49
## 1940.0 175 135 149 141 161 ... 134 105 127 116 110
## 1945.0 187 178 178 174 179 ... 148 146 160 193 161
## 1950.0 138 165 171 180 166 ... 194 151 208 224 174
## 1955.0 0 6 31 81 102 ... 185 172 262 304 192
## 1960.0 0 0 0 0 0 ... 184 190 249 274 209
## 1965.0 0 0 0 0 0 ... 191 163 189 239 186
## 1970.0 0 0 0 0 0 ... 171 192 228 219 174
## 1975.0 0 0 0 0 0 ... 188 181 233 226 215
## 1980.0 0 0 0 0 0 ... 186 198 254 253 226
## 1985.0 0 0 0 0 0 ... 171 149 218 267 212
## 1990.0 0 0 0 0 0 ... 58 113 139 226 196
## 1995.0 0 0 0 0 0 ... 0 0 31 99 137
## 2000.0 0 0 0 0 0 ... 0 0 0 0 22
##
## [25 rows x 32 columns]
## Warning: The `printer` argument is deprecated as of rlang 0.3.0.
## This warning is displayed once per session.
test of html formatting